<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <link rel="stylesheet" href="edit/themes/default/default.css" />
        <link rel="stylesheet" href="edit/plugins/code/prettify.css" />
        <script charset="utf-8" src="edit/kindeditor.js"></script>
        <script charset="utf-8" src="edit/lang/zh_CN.js"></script>
        <script charset="utf-8" src="edit/plugins/code/prettify.js"></script>
        <script type="text/javascript">

           <!-- KindEditor.ready(function(K) {
                var editor1 = K.create('textarea[id="content"]', {
                    //width : w,
                    cssPath: 'edit/plugins/code/prettify.css',
                    uploadJson: 'edit/php/upload_json.php',
                    fileManagerJson: 'edit/php/file_manager_json.php',
                    allowFileManager: true,
                    urlType: "domain",
                    afterCreate: function() {
                        var self = this;
                        K.ctrl(document, 13, function() {
                            self.sync();
                            K('form[name=rowForm]')[0].submit();
                        });
                        K.ctrl(self.edit.doc, 13, function() {
                            self.sync();
                            K('form[name=rowForm]')[0].submit();
                        });
                    }
                });
                prettyPrint();
            });-->
        </script>
        <script src="js/time.js?"></script>
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm" name="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
                <tr><td><?= translate('ITEM_ID') ?>:</td><td><input type="text" name="row[id]" id="id" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_NAME') ?>:</td><td><input type="text" name="row[name]" id="name" size="10" /></td></tr>

                <tr><td><?= translate('ITEM_KIND') ?>:</td><td><input type="text" name="row[kind]" id="kind" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_SUB_KIND') ?>:</td><td><input type="text" name="row[subkind]" id="subkind" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_COLOR') ?>:</td><td><input type="text" name="row[color]" id="color" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_STACK_LIMIT') ?>:</td><td><input type="text" name="row[stacklimit]" id="stacklimit" size="10" /></td></tr>

                <tr><td><?= translate('ITEM_BUY_GOLD') ?>:</td><td><input type="text" name="row[buygold]" id="buygold" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_SELL_GOLD') ?>:</td><td><input type="text" name="row[sellgold]" id="sellgold" size="10" /></td></tr>

                <tr><td><?= translate('ITEM_CAN_DECOMPOSE') ?>:</td><td><input type="text" name="row[candecompose]" id="candecompose" size="10" /></td></tr>
                <tr><td><?= translate('ITEM_RECOMMEND') ?>:</td><td><input type="text" name="row[recommend]" id="recommend" size="10" /></td></tr>

                <tr><td></td><td>
                        <input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/>
                        <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#id").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
            });
        </script>
    </body>
</html>
